package com.example.bookstore.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.bookstore.entity.Book;

import com.example.bookstore.entity.User;
import com.example.bookstore.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@Controller
public class BookController {

    @Autowired
    BookService bookService;

    @PostMapping("add3")
    @ResponseBody
    public String insertUser(@RequestBody Book book){

        bookService.Insert(book);
        return "success";
    }
}
